<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>支付页面</title>
    <%
        pageContext.setAttribute("APP_PATH", request.getContextPath());
    %>
    <script src="${APP_PATH}/static/js/jquery-3.1.1.min.js"></script>
    <link rel="stylesheet"
          href="${APP_PATH}/static/bootstrap-3.4.1-dist/css/bootstrap.min.css">
    <script
            src="${APP_PATH}/static/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
</head>
<body>
<div class="pay" align="center">
<h1>支付</h1>
<table class="table" style="border:solid 2px #b7ddf2">
  	<tr>
  		<td>汽车编号</td>
  		<td>价格</td>
  		<td>品牌</td>
  		<td>类型</td>
  		<td>车牌</td>
  	</tr>
  	<tr>
  		<td>${requestScope.car.id }</td>
  		<td>${requestScope.car.price }</td>
  		<td>${requestScope.car.brand }</td>
  		<td>${requestScope.car.type }</td>
  		<td>${requestScope.car.number }</td>
  	</tr>
</table>
支付：<select>
		<option value="1">支付宝</option>
		<option value="2">微信</option>
		<option value="3">银行</option>
	</select><br><br>
<%--  <button class="btn btn-primary" type="button" onclick="doOrder(${requestScope.car.id})">支付(ajax)</button><br>--%>
 	<form action="${APP_PATH}/something/do?id=${requestScope.car.id}" method="post">
 		<button type="submit" class="btn btn-primary" >支付</button>
 	</form>
</div>
<script type="text/javascript">
	function doOrder(id){
		$.ajax({
			url:"${APP_PATH}/something/do",
			data:{"id":id},
			type:"POST",
			success:function(){
				
			}
		});
	}
</script>
</body>
</html>